<%@ page import="com.grouplay.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: YYW
  Date: 2020/5/30
  Time: 21:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String name = "";
    if (session.getAttribute("user") == null){
        out.print("<h3>\n" +
                "    未登录\n" +
                "</h3>");
        return;
    } else {
        name = ((User) session.getAttribute("user")).getName();
    }
%>
<form class="form-horizontal" role="form" action="./user/sendMessage" method="post" id="sendMessageForm" onsubmit="return sendMessage();">
    <div class="form-group">
        <label for="targetName" class="col-sm-3 control-label">收件人用户名：</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" id="targetName" name="targetName" required/>
        </div>
    </div>
    <div class="form-group">
        <label for="message" class="col-sm-3 control-label">消息内容：</label>
        <div class="col-sm-8">
            <textarea class="form-control" id="message" rows="10" name="message" required></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <button type="submit" class="btn btn-default">发送</button>
        </div>
    </div>
</form>
